package com.ruoyi.web.mapper;

import java.util.Date;
import java.util.List;
import com.ruoyi.web.domain.MesInventoryInfo;
import com.ruoyi.web.domain.MesInventoryDetail;
import com.ruoyi.web.domain.vo.InventoryVo;
import com.ruoyi.web.domain.vo.MesInventoryInfoVo;
import com.ruoyi.web.domain.vo.StatVo;

/**
 * 盘点Mapper接口
 * 
 * @author wxt
 * @date 2024-01-24
 */
public interface MesInventoryInfoMapper 
{
    /**
     * 查询盘点
     * 
     * @param id 盘点主键
     * @return 盘点
     */
    public MesInventoryInfo selectMesInventoryInfoById(Long id);

    /**
     * 查询盘点列表
     * 
     * @param mesInventoryInfo 盘点
     * @return 盘点集合
     */
    public List<MesInventoryInfo> selectMesInventoryInfoList(MesInventoryInfo mesInventoryInfo);

    public List<MesInventoryInfoVo> selectMesInventoryDetail(MesInventoryInfo mesInventoryInfo);
    public MesInventoryInfoVo selectMesInventoryDetailSum(MesInventoryInfo mesInventoryInfo);
    public List<InventoryVo> selectMesDetaillist(MesInventoryInfo mesInventoryInfo);

    //获取上一次盘点时间
    public Date selectRecently(String machineId);

    public List<InventoryVo> selectDayInventory(MesInventoryInfo mesInventoryInfo);

    /**
     * 新增盘点
     * 
     * @param mesInventoryInfo 盘点
     * @return 结果
     */
    public int insertMesInventoryInfo(MesInventoryInfo mesInventoryInfo);

    /**
     * 修改盘点
     * 
     * @param mesInventoryInfo 盘点
     * @return 结果
     */
    public int updateMesInventoryInfo(MesInventoryInfo mesInventoryInfo);

    //修改纸张库存
    public int updatePaperQuantity(MesInventoryInfo mesInventoryInfo);
   //修改纸张机台库存
    public int updateMachinePaperQuantity(MesInventoryInfo mesInventoryInfo);
    /**
     * 删除盘点
     * 
     * @param id 盘点主键
     * @return 结果
     */
    public int deleteMesInventoryInfoById(Long id);

    /**
     * 批量删除盘点
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteMesInventoryInfoByIds(Long[] ids);

    /**
     * 批量删除盘点明细
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteMesInventoryDetailByInventoryids(Long[] ids);
    
    /**
     * 批量新增盘点明细
     * 
     * @param mesInventoryDetailList 盘点明细列表
     * @return 结果
     */
    public int batchMesInventoryDetail(List<MesInventoryDetail> mesInventoryDetailList);
    

    /**
     * 通过盘点主键删除盘点明细信息
     * 
     * @param id 盘点ID
     * @return 结果
     */
    public int deleteMesInventoryDetailByInventoryid(Long id);
    public int selectMaxId();

   public MesInventoryInfo selectFinal(MesInventoryInfo data);
    public MesInventoryInfo selectMachineFinal(MesInventoryInfo data);

    public List<StatVo> warehousestat(MesInventoryInfo data);
    public List<StatVo> cuttingGroupStat(MesInventoryInfo data);
    public List<StatVo> warehousestatNot(MesInventoryInfo data);
    public List<StatVo> machinestat(MesInventoryInfo data);
    public List<StatVo> machinestatNot(MesInventoryInfo data);

    //仓库和机台都没有选择
    public List<StatVo> wareMachineByPaper(MesInventoryInfo data);



}
